package com.greensecurity.sim.service.impl;

import com.greensecurity.sim.entity.Permissions;
import com.greensecurity.sim.entity.Role;
import com.greensecurity.sim.entity.User;
import com.greensecurity.sim.repository.UserMessageRepository;
import com.greensecurity.sim.repository.UserRepository;
import com.greensecurity.sim.service.LoginService;
import org.junit.Test;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

@Service
public class LoginServiceImpl implements LoginService {

    @Resource
    private UserRepository userRepository;

    @Override
    public User findByUserName(String getMapByName) {
        return userRepository.findByUserName(getMapByName);
    }

    @Override
    public User findByPhone(String phone) {
        return userRepository.findByPhone(phone);
    }

}